ef core unique index

51

ef core unique index -

protected override void OnModelCreating(ModelBuilder modelBuilder){    modelBuilder.Entity<Book>()        .HasIndex(b => b.Isbn)        .IsUnique();}

Comments

Submit
0 Comments